<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>


    <link href="https://cdn.staticfile.org/font-awesome/4.4.0/css/font-awesome.css?v=4.4.0" rel="stylesheet">


    <link rel="stylesheet" href="../Content/css/base/reset.css">

    <link rel="stylesheet" href="../Content/css/base/color.css">

    <link rel="stylesheet" href="../Content/css/base/backgroudcolor.css">

    <link rel="stylesheet" href="../Content/css/base/border.css">

    <link rel="stylesheet" href="../Content/css/base/fontsize.css">

    <link rel="stylesheet" href="../Content/css/base/padding.css">

    <link rel="stylesheet" href="../Content/css/base/margin.css">

    <link rel="stylesheet" href="../Content/css/base/widget.css">

    <!--<link rel="stylesheet" href="../Content/css/beyond_bak.css">-->

    <!--<link rel="stylesheet" href="../Content/css/beyond.css">-->

    <style>


        .fl {
            float: left;
            display: inline-block;
        }

        .fr {
            float: right;
            display: inline-block;
        }

        .wp90 {
            width: 90%;
        }

        .w40 {
            width: 36px;
            height: 400px;
            /*background-color: orangered;*/
        }

        .line {
            height: 600px;
            width: 50%;
            margin-left: 50%;
            border-left: 1px dotted #888;
        }

        .clearfix {
            clear: both;
        }

    </style>

</head>

<body style="width:90%; margin-top: 20px;">

<div class="clearfix">

    <div class="clearfix" style="margin: 10px auto;">

        <a class="toggleWidget"
           style="padding: 3px 10px; border: 1px #eee solid; background-color: deepskyblue; cursor: pointer;">全部折叠切换</a>

    </div>


    <div class="fl w40">
        <div class="line"></div>
    </div>

    <div class="fl wp90">
        <div class="widget flat">
            <div class="widget-header bg-sc-danger">
                <span class="foreIcon">1</span>
                <i class="fa fa-arrow-down widget-icon "></i>
                <span class="widget-caption">标题背景色可定制</span>

                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize"> <i class="fa fa-expand "></i></a>
                    <a href="#" data-toggle="collapse"><i class="fa fa-minus "></i></a>
                    <a href="#" data-toggle="dispose"><i class="fa  fa-times "></i></a>
                </div>
            </div>
            <div class="widget-body   ">
                <h1> bg-sc-danger</h1>

                <h1> bg-sc-danger</h1>

                <h1> bg-sc-danger</h1>

                <h1> bg-sc-danger</h1>
            </div>
        </div>




        <div class="widget flat ">
            <div class="widget-header bordered-sc-danger  bordered-top "><span class="widget-caption">偏平化(无阴影和边框)</span>
                <span class="foreIcon">2</span>
                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize"> <i class="fa fa-expand "></i></a>
                    <a href="#" data-toggle="collapse"><i class="fa fa-minus "></i></a>
                    <a href="#" data-toggle="dispose"><i class="fa  fa-times "></i></a>
                </div>
            </div>
            <div class="widget-body   " style="height: auto;"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
                do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
            </div>
        </div>


        <div class="widget flat ">
            <div class="widget-header bordered-sc-green  bordered-top "><span class="widget-caption">偏平化(无阴影和边框)</span>
                <span class="foreIcon">3</span>
                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize"> <i class="fa fa-expand "></i></a>
                    <a href="#" data-toggle="collapse"><i class="fa fa-minus "></i></a>
                    <a href="#" data-toggle="dispose"><i class="fa  fa-times "></i></a>
                </div>
            </div>
            <div class="widget-body   " style="height: auto;"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
                do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
            </div>
        </div>

        <div class="widget flat ">
            <div class="widget-header bordered-sc-danger  bordered-top "><span class="widget-caption">偏平化(无阴影和边框)</span>
                <span class="foreIcon">4</span>
                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize"> <i class="fa fa-expand "></i></a>
                    <a href="#" data-toggle="collapse"><i class="fa fa-minus "></i></a>
                    <a href="#" data-toggle="dispose"><i class="fa  fa-times "></i></a>
                </div>
            </div>
            <div class="widget-body   " style="height: auto;"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
                do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
            </div>
        </div>

        <div class="widget flat ">
            <div class="widget-header bordered-sc-danger  bordered-left "><span class="widget-caption">偏平化(无阴影和边框)</span>
                <span class="foreIcon">5</span>
                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize"> <i class="fa fa-expand "></i></a>
                    <a href="#" data-toggle="collapse"><i class="fa fa-minus "></i></a>
                    <a href="#" data-toggle="dispose"><i class="fa  fa-times "></i></a>
                </div>
            </div>
            <div class="widget-body   " style="height: auto;"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
                do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
            </div>
        </div>


        <div class="widget flat radius-bordered">
            <div class="widget-header    lined"><span class="widget-caption"> 带非封闭式下划线 (类似 设计图) </span>

                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize"> <i class="fa fa-expand "></i></a>
                    <a href="#" data-toggle="collapse"><i class="fa fa-minus "></i></a>
                    <a href="#" data-toggle="dispose"><i class="fa  fa-times "></i></a>
                </div>
            </div>
            <div class="widget-body   "><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
                incididunt ut labore et dolore magna aliqua.</p>
            </div>
        </div>


    </div>


</div>

<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>

<script src="../Content/js/beyond.js"></script>

<script>
    $(function () {

        $(".toggleWidget").click(function () {
            var hasClass = $($(".widget")[0]).hasClass('collapsed');
            if (hasClass) {
                //最终要去掉
                $(".widget").each(function () {
                    var that = this;
                    if ($(that).hasClass('collapsed')) {

                        $(that).find('.widget-body').slideDown(200, function () {
                            $(that).removeClass("collapsed")
                        });
                    }

                });
            } else {
                //最终要加掉
                $(".widget").each(function () {

                    var that = this;
                    if (!$(that).hasClass('collapsed')) {
                        $(that).find('.widget-body').slideUp(200, function () {
                            $(that).addClass("collapsed")
                        });
                    }

                });
            }
        });

    });
</script>


<script>

</script>

</body>

</html>